package com.kimo3412.amqp_test.controller;

// LogController.java
import com.kimo3412.amqp_test.service.LogProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogController {
    @Autowired
    private LogProducer logProducer;

    @PostMapping("/logs")
    public void createLog(@RequestBody String message) {
        logProducer.sendLog(message);
    }
}
